package com.yangye.cloud.demo.order.config;

import com.zaxxer.hikari.HikariDataSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

/**
 * @author yangye
 * @date 2020/11/30
 */
@Configuration
public class DatasourceConfiguration {

	@Bean
	public DataSource dataSource() {
		HikariDataSource dataSource = new HikariDataSource();
		dataSource.setJdbcUrl("jdbc:mysql://81.68.201.234:3306/dtx-order?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8");
		dataSource.setUsername("root");
		dataSource.setPassword("Yy920312@@");
		return dataSource;
	}
}
